package com.company.exp2.event.impl;

import com.company.exp2.event.Event;
import com.company.exp2.station.Station;
import com.company.exp2.typeEnum.EventType;

public class FrameStartTransmittingEvent extends Event {

    /**
     * @param timestamp         事件发生的时间戳
     * @param associatedStation 需要传输帧的站点
     */
    public FrameStartTransmittingEvent(long timestamp, Station associatedStation) {
        super(timestamp, associatedStation);
    }

    @Override
    public void occur() {
        getAssociatedStation().onFrameStartTransmit(getTimestamp());
    }

    @Override
    public EventType getEventType() {
        return EventType.FRAME_START_TRANSMIT;
    }
}
